package com.genntii.examManager.domain.question.vo;

import com.genntii.examManager.domain.question.mongo.ExamDetail;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ExamDetailVO {
    private Long id;
    private String subjectName;
    private String examName;
    private String courseName;
    private String teacherName;
    private LocalDateTime startTime;
    private LocalDateTime endTime;
    private Integer continueTime;
    private Integer score;
    private Topic topic;

    public ExamDetailVO(ExamDetail examDetail){
        this.id = examDetail.get_id();
        this.subjectName = examDetail.getSubjectName();
        this.courseName = examDetail.getCourseName();
        this.startTime = examDetail.getStartTime();
        this.endTime = examDetail.getEndTime();
        this.teacherName = examDetail.getTeacherName();
        this.score = examDetail.getScore();
        this.topic = examDetail.getTopic();
        this.continueTime = examDetail.getContinueTime();
    }
}
